import { privacyType } from '@/types'
import styles from './styles.module.less'
import classNames from 'classnames'
const TextBox = ({ title, data }: privacyType) => {
  return (
    <div className={styles.TextBoxPage}>
      <p className={styles.title}>{title}</p>
      {data.map((item, index) => {
        return (
          <div key={index} className={styles.text}>
            {item.map((i, textIndex) => {
              return (
                <p
                  key={textIndex}
                  className={classNames({ [styles.textBox]: item.length > 1 })}
                >
                  {i}
                </p>
              )
            })}
          </div>
        )
      })}
    </div>
  )
}

export default TextBox
